﻿{% extends "html/base.html" %}

{% block title %}PersonaCards - Criar persona{% endblock %}

{% block head %}
	<link type="text/css" rel="stylesheet" href="/css/card.css" />
{% endblock %}

{% block body %}
	<h1>Inserir persona</h1>
	<h2 style="font-size:16px; padding:20px 4px 10px;">Selecionar mecânica</h2>
	<div id="form_container">
		<form id="formCriacaoPersona" class="appnitro" enctype="multipart/form-data" method="post" action="/escolherMecanica">
			{% if mecanicas %}
				{% for i in range(0,8) %}
					{% if mecanicas[i] != None %}
						<div style="width:100%; heigth: 320px; float:left; overflow:auto; overflow-y:hidden;">
							<div class="divSeparator" ></div>
							<h2 style="font-size:16px; padding:20px 4px 10px;">{{descricoesMecanicas[i]}}</h2>
							{% for mecanica in mecanicas[i] %}
								<div class="inlineTable">
									<div class="cardborder blackborder">
										<div class="innercardborder">
											<div class="card Colourless part1">
												<span class="left_of_namebox"></span>
												<div class="pinline pinline_box namebox">
													<div class="cardtitlebar">
														<div class="cardname">
														  <span title="">{{mecanica.nome}}</span>
														</div>
														<div class="cardmanacost"></div>
														&nbsp;
													</div>
												</div>
												<div class="cardart_container">
													<div class="pinline pinline_sides">
														<div class="cardart image">
															<!-- Imagem da mecanica -->
															{% if mecanica.mid %}
																<img src="img?id={{mecanica.mid}}&tipo=m">
															{% endif %}	
														</div>
													</div>
												</div>
												<div class="pinline pinline_box typebox">
													<div class="cardtypebar">
														<div class="cardrarity mythic">
															&nbsp;P&nbsp;
														</div>
														<div class="cardtype">
															<span>Mecânica</span>
														</div>
													</div>
												</div>
												<div class="cardtext_container">
													<div class="pinline pinline_sidesbottom">
														<div class="cardtext">
															<div class="rulestext_wrapper">
																<div class="rulestext">{{mecanica.descricao}}</div>           
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="divCenter">
										<input id="chkMecanica_{{mecanica.Id}}" type="checkbox" name="chkMecanica"  value="{{mecanica.mid}}"/>
									</div>
								</div>
							{% endfor %}
							<a href="/criarMecanica?vinc=1&{% if vincc %}vincc=1&{% elif cinetica %}cinetica=1&{% endif %}tipo={{i}}">
								<div class="inlineTable">
									<div class="cardborder blackborder">
										<div class="innercardborder">
											<div class="card Colourless part1">
												<span class="left_of_namebox"></span>
												<div class="pinline pinline_box namebox">
													<div class="cardtitlebar">
														<div class="cardname">
														  <span title="">Nova Mecânica</span>
														</div>
														<div class="cardmanacost"></div>
														&nbsp;
													</div>
												</div>
												<div class="cardart_container">
													<div class="pinline pinline_sides">
														<div class="cardart image">
															<!-- Imagem da mecanica -->
															<img src="/images/add-icon.png">
														</div>
													</div>
												</div>
												<div class="pinline pinline_box typebox">
													<div class="cardtypebar">
														<div class="cardrarity mythic">
															&nbsp;P&nbsp;
														</div>
														<div class="cardtype">
															<span>Mecânica</span>
														</div>
													</div>
												</div>
												<div class="cardtext_container">
													<div class="pinline pinline_sidesbottom">
														<div class="cardtext">
															<div class="rulestext_wrapper">
																<div class="rulestext">Adiconar nova mecânica...</div>           
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</a>
						</div>
					{% endif %}
				{% endfor %}
			{% endif %}
			
			{% if vincc %}
				<input type="hidden" name="vincc" value="1">
			{% endif %}
			
			{% if cinetica %}
				<input type="hidden" name="cinetica" value="1">
			{% endif %}
			
			<div class="divCenter">
				<input class="defaultButton" type="submit" value="Próximo" />
			</div>
		</form>
	</div>
{% endblock %}

{% block jsBlock %}
	
{% endblock %}